# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Simon Sapin <simon dot sapin at exyr dot org>
# Contributor: Kyle Keen <keenerd@gmail.com>

pkgname=python-tailer
pkgver=0.4.1
pkgrel=7
pkgdesc="A simple implementation of GNU tail and head"
url="https://github.com/six8/pytailer"
license=('MIT')
arch=('any')
depends=('python')
source=("https://pypi.io/packages/source/t/tailer/tailer-$pkgver.tar.gz")
sha512sums=('c1f0f4cf9356c58366e3d86087bc922378a5d5d9833385e8b0f9acd16211a7ff486c4ea3be13208b85a9766b3fa163071216de54c7170395c18ba6da61650da3')

build() {
  cd tailer-$pkgver
  python setup.py build
}

check() {
  cd tailer-$pkgver
  python -m doctest -v src/tailer/__init__.py
}

package() {
  cd tailer-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
